<template>
  <div class="container">
   <!-- 顶部导航栏 -->
  <AppNavbar />
   <!-- 头部组件 -->
   <AppHeader />
   <!-- 吸顶头部组件 -->
  <AppHeaderSticky />
   <!-- 内容容器 -->
   <div class="main">
   <!-- 二级路由 -->
   <router-view></router-view>
   </div>
   <!-- 底部组件 -->
   <appFooter />
  </div>
</template>
<script>
import AppNavbar from "@/components/app-navbar.vue"
import AppHeader from "@/components/app-header.vue"
import appFooter from "@/components/app-footer.vue"
import AppHeaderSticky from "@/components/app-header-sticky.vue"

import { useStore } from "vuex"
export default {
  name:"HomePage",
  components:{
    AppNavbar,
    AppHeader,
    appFooter,
    AppHeaderSticky

  },
  // 获取分类数据
  setup(){
    const store=useStore()
    store.dispatch('category/getList')
  }
}
</script>
<style lang="less" scoped></style>
